<?php
/**
 * Created by PhpStorm.
 * User: zy-l
 * Date: 2019/6/19
 * Time: 1:23 AM
 */

namespace App\HttpController\Api;

use App\HttpController\Base;
use App\Model\InfoBulletin;

/**
 * 获取公告
 * Class Bulletin
 * @package App\HttpController\Api
 */
class Bulletin extends Base
{
    /**
     * 模型
     * @return InfoBulletin
     */
    public function getInfoBulletinModel()
    {
        return new InfoBulletin();
    }

    /**
     *
     */
    public function index()
    {
        $where=[];
        $where['id|order']='desc';
        return $this->writeJson('获取数据', $this->getInfoBulletinModel()->findOne($where));
    }
}